<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>文件上传测试</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }

        .container {
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 400px;
            text-align: center;
        }

        h2 {
            color: #333;
        }

        form {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        label {
            font-weight: bold;
            margin-bottom: 5px;
        }

        input[type="file"],
        input[type="text"],
        input[type="submit"] {
            padding: 10px;
            margin-bottom: 15px;
            width: 80%;
            border: 1px solid #ccc;
            border-radius: 4px;
            transition: border-color 0.3s ease-in-out;
        }

        input[type="file"]:hover,
        input[type="text"]:hover,
        input[type="submit"]:hover {
            border-color: #007bff;
        }

        input[type="submit"] {
            background-color: #007bff;
            color: #fff;
            cursor: pointer;
            transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
        }

        input[type="submit"]:hover {
            background-color: #0056b3;
        }

        input[type="file"] {
            cursor: pointer;
        }

        input[type="file"]::-webkit-file-upload-button {
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 4px;
            padding: 10px 20px;
            cursor: pointer;
            transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
        }

        input[type="file"]::-webkit-file-upload-button:hover {
            background-color: #0056b3;
        }

        .error-message {
            color: #dc3545;
            margin-top: 10px;
        }

        .success-message {
            color: #28a745;
            margin-top: 10px;
        }

    </style>
</head>
<body>
<div class="container">
    <h2>文件上传测试</h2>
    <form action="/upload" method="post" enctype="multipart/form-data">
        <label for="file">选择文件:</label>
        <input type="file" id="file" name="file" required><br><br>

        <label for="folder">选择文件夹名:</label>
        <input type="text" id="folder" name="folder" required><br><br>

        <label for="fileName">自定义文件名:</label>
        <input type="text" id="fileName" name="fileName" required><br><br>

        <input type="submit" value="上传">
    </form>
</div>
</body>
</html>
